//
//  UIImageView+Category.m
//  OnionHome
//
//  Created by fengjie on 2019/9/21.
//  Copyright © 2019 FengJie. All rights reserved.
//

#import "UIImageView+Category.h"
#import <UIImageView+WebCache.h>



@implementation UIImageView (Category)

/**
 *  imageView添加图片
 *
 *  @param urlStr   图片URL
 *  @param image 站位image
 */
-(void)imageViewWithUrl:(nullable NSString *)urlStr placeholderImage:(nullable NSString *)image{
//    NSString *imageUrl = [NSString stringWithFormat:@"%@%@",PATH,url];
//    if (![imageUrl containsString:@".png"]) {
//       imageUrl = [imageUrl stringByAppendingString:@".png"];
//    }
    [self sd_setImageWithURL:[NSURL URLWithString:urlStr] placeholderImage: StrValid(image) ? IMAGE_NAMED(image) : nil];

}
@end
